import router from '@system.router';
export default {
    data: {
        title: 'World',
        progressPercent: 20,
        progressColor: "#00ff00",
        bgColor: "#669966",
        percent: 90,
        kneading:'3.5',
        stretch:'2.6',
        tremble:'2.1',
        muscle:'3.4',
        returnContent: '',
        lineData: [
            {
                strokeColor: '#0081ff',
                fillColor: '#cce5ff',
                data: [763, 550, 551, 554, 731, 654, 525, 696, 595, 628],
                gradient: true,
            }
        ],
        lineOps: {
            xAxis: {
                min: 0,
                max: 20,
                display: false,
            },
            yAxis: {
                min: 0,
                max: 1000,
                display: false,
            },
            series: {
                lineStyle: {
                    width: "2px",
                    smooth: true,
                },
                headPoint: {
                    shape: "circle",
                    size: 5,
                    strokeWidth: 5,
                    fillColor: '#ffffff',
                    strokeColor: '#007aff',
                    display: true,
                },
                loop: {
                    margin: 2,
                    gradient: true,
                }
            }
        },
    },
    onInit(){
        if(this.progressPercent>0 && this.progressPercent<=20){
            this.progressColor = "#b32ee72e"
        } else if (this.progressPercent>20 && this.progressPercent<=40){
            this.progressColor = "#80c8ff00"
        } else if (this.progressPercent>40 && this.progressPercent<=60){
            this.progressColor = "#80ffd500"
        } else if (this.progressPercent>60 && this.progressPercent<=80){
            this.progressColor = "#80ff7700"
        } else if (this.progressPercent>80){
            this.progressColor = "#80ff0000"
        }
    },
    launch4() {
        router.push ({
            uri: 'pages/niam/niam',
        });
    },
    launch5() {
        router.push ({
            uri: 'pages/action2/action2',
        });
    },
    launch6() {
        router.push ({
            uri: 'pages/pinggu/pinggu',
        });
    },
}